package cn.gxa.j229.bug.finance.service.borrowing;

import cn.gxa.j229.bug.finance.pojo.Loan;

import java.util.List;
import java.util.Map;

public interface LoanService {
    int deleteByNum(String num);

    int insert(Loan record);

    int insertSelective(Loan record);

    Loan selectById(Integer id);

    int updateByIdSelective(Loan record);

    int updateById(Loan record);

    List<Map<String,Object>> findById(Integer id);

    List<Map<String,Object>> findByPage(int limit, int page);

    /**
     * findByPage方法总记录数计算
     * @param
     * @param
     * @return
     */
    Integer findByPageCount();

    //根据手机号查询
    List<Map<String,Object>> findByPhone(String phone);
    //根据借款方查询
    List<Map<String,Object>> findByBorrower(String borrower);

    int updating(Loan loan);

    int fullupdate(Loan loan);

    List<Map<String,Object>> findingByPage(Loan loan);
    /**
     * findingByPage方法的总记录数计算
     * @param loan
     * @return
     */
    Integer findingByPageCount(Loan loan);

    List<Map<String,Object>> findFinishByPage(Loan loan);
    /**
     * findFinishByPageCount方法的总记录数计算
     * @param loan
     * @return
     */
    Integer findFinishByPageCount(Loan loan);

    List<Map<String,Object>> findAll();

    // 新标维护
    List<Map<String,Object>> findLikeLoanDefend(Loan loan);
    Integer findLikeLoanDefendCount(Loan loan);
    // 借款审核
    List<Map<String,Object>> findLikeLoanCheck(Loan loan);
    Integer findLikeLoanCheckCount(Loan loan);
    int update(Loan loan);

    int updateByNumPass(String num);

    int updateByNumUnPass(String num);

    int updateByNumSelective(Loan record);
}
